<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/jsp/commons/taglibs.jsp"%>
<!DOCTYPE html >
<html>
<head>
<jsp:include page="/jsp/commons/cssinclude.jsp"></jsp:include>
<jsp:include page="/jsp/commons/scriptinclude.jsp"></jsp:include>
<meta charset="utf-8">
<title>晶品科技信息管理系统-配置管理</title>
<meta name="keywords" content="">
<meta name="description" content="">

<script type="text/javascript">
	//分页查询
	function queryCategory() {
		var path = "${ctx}/syspara/sysparaAction!list.action";
		query(path);

	}
	function queryPage(path, pageindex) {
		pageIndex = pageindex;
		query(path);

	}
	$(document).ready(function() {
		queryCategory();

	});
	 
</script>
</head>
<body>
	<div class="mainbox">
		<div class="main_content"> 
			<div class="main_right">
				<div class="main_rightbox">
					<!--面包屑 begin-->
					<div class="ec_crumb_kc">
						<span><a class="icon_index" href="${ctx }">返回首页</a></span>当前位置：<a
							style="cursor: pointer; color: #0678BD;" href="${ctx }">首页</a>&nbsp;&gt;&nbsp;<a
							style="cursor: pointer; color: #0678BD;" href="${ctx }">配置管理</a>&nbsp;&gt;&nbsp;<em>字典管理</em>
					</div>
					<!--配置图片 begin-->
					<div class="service">
						<a class="lmImg icon1"
							href="${ctx}/syspara/sysparaAction!sysparaAddInit.action">增加字典</a>



					</div>
					<!--查询 begin-->
					<div class="user">
						<div class="user_search">
							<form id="businessForm" method="post">
								<div class="frm_cont" id="lmname">
									<label for="lmname">字典名称：</label> <input type="text"
										value="请输入名称" id="lmname" 
										 name="syspara.name" />
								</div>
								<div class="frm_cont" id="flm">
									<label for="flm">字典编码：</label> <input type="text"
										value="请输入字典编码" id="flm" 
										 name="syspara.code" />
								</div>
								<div class="frm_cont" id="spfl">
									<label for="spfl">字典类型：</label> <input value="请输入字典类型"
										 
										name="syspara.type" type="text" value="${syspara.type}"
										id="txt" name="txt" />

								</div>
								<div class="frm_cont" id="lrfs">
									<label for="lrfs">状态：</label> <select id="status"
										name="systemConfigDTO.systemConfigs.status"
										style="border: 1px solid #DDDDDD; color: #999999; float: right; height: 29px; line-height: 29px; padding-left: 5px; width: 218px;">
										<option value="">---请选择---</option>
										<option value="0">无效</option>
										<option value="1">有效</option>
									</select>
								</div>

							</form>
						</div>
						<div class="tbn_search" id="btncenter">
							<a href="javascript:void(0)"
								onclick="queryPage('${ctx}/syspara/sysparaAction!list.action',0)">查询</a>
						</div>
						<div class="clear"></div>
					</div>
					<!--表格 & 分页-->
					<div id="Searchresult">
						<table width="100%" border="0" cellspacing="0" cellpadding="0"
							class="tab">
							<tr>
								<th>序号</th>
								<th>字典名称</th>
								<th>字典编码</th>
								<th>字典值</th>
								<th>状态</th>
								<th>类型</th>
								<th>排序</th>
								<th>创建时间</th>
								<th>操作</th>
							</tr>
							<tr>
								<td colspan="8">正在查询...</td>
							</tr>
						</table>
					</div>

				</div>
			</div>
		</div>
	</div>


	<!-- JQ -->
	<script type="text/javascript">
		function updateStatus(sysparaId, flag) {
			//提示语
			var tip = "";
			if (flag == "0") {
				tip = "启用";
			} else {
				tip = "禁用";
			}

			//异步请求修改状态
			if (confirm("确定要" + tip + "该条记录？")) {
				$.post(
						"${ctx}/syspara/sysparaAction!updateState.action",
						{
							random : Math.random(),
							"syspara.id" : sysparaId,
							"syspara.state" : flag
						},
						function(data) {
							var jsonData = strToJson(data);
							if (jsonData.flag == "error") {
								alert(jsonData.errorMsg);
							}
							window.location.href = "${ctx}/syspara/sysparaAction!initSyspara.action";
						});
			}
		}
	</script>
</body>
</html>